<template>
    <div>
        <Navbar v-show="show"></Navbar>
        <!-- 动态组件 -->
        <component :is="which?List:Child"></component>
        
    </div>
</template>

<script setup>
import Navbar from './Navbar.vue';
import List from './List.vue';
import Child from './Child.vue';
import { provide, ref } from 'vue';

const which = ref(true);
const show = ref(true);
provide("which", which)
provide("show", show)
</script>